import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import { Router,browserHistory,hashHistory } from 'react-router';
import injectTapEventPlugin from 'react-tap-event-plugin';
import "./css/style.less";
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from  'react-router-redux';
import routes from './routes.js';
import store from './store';

injectTapEventPlugin();
const history = syncHistoryWithStore(browserHistory,store);
class App extends React.Component{
    render(){
        return (
            <Provider store={ store }>
                <Router
                    routes={ routes }
                    history={ history }
                />
            </Provider>
        )
    }
}

ReactDOM.render( <App />, document.getElementById("app"));
